<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>display and hidden</title>
</head>
<body>
<div id="app">
  <todo-item></todo-item>
<!--  <list-item></list-item>-->
</div>

<script src="vue.global.js"></script>
<script>
  const todoMsg = {
    data(){
      return{
        msg: "components of todoMsg"
      }
    },
    props: [todo],
    template: `
    <li>{{todo.text}}</li>
    <li>This is a todoMsg</li>
    <li>{{msg}}</li>
    `
  }
  const listMsg = {
    data(){
      return{
        msg: 'components of listMsg'
      }
    },
    props: [],
    template: `
    <li>This is a listMsg</li>
<!--    <div slot="slot">slot &ndash;&gt; {{msg}}</div>-->
    <li>{{msg}}</li>

    `
  }
  const App = {
    data(){
      return {
        todos: [
          { text: 'Learn JavaScript' },
          { text: 'Learn Vue' },
          { text: 'Build something awesome' }
        ]
      }
    },
    components: {
      'todoItem': todoMsg,
      'listItem': listMsg,
    }
  }

  const vm = Vue.createApp(App).mount('#app');
  console.log(vm)
</script>
</body>
</html>
